Merged.
authoremellor@leeni.uk.xensource.com <emellor@leeni.uk.xensource.com>
Wed, 23 Nov 2005 19:31:22 +0000 (19:31 +0000)
committeremellor@leeni.uk.xensource.com <emellor@leeni.uk.xensource.com>
Wed, 23 Nov 2005 19:31:22 +0000 (19:31 +0000)
linux-2.6-xen-sparse/drivers/xen/netfront/netfront.c
tools/examples/block
tools/examples/block-common.sh
tools/examples/block-enbd
tools/examples/block-nbd

index a3efed0d05388d03bbe20ca80285b06b1c4e539f..91ff5069aa9969254209b2c3d1ae690baeebad7b 100644 (file)
@@ -155,6 +155,8 @@ struct netfront_info
           (_list)[0]  = (_list)[_id];                          \
           (unsigned short)_id; })
 
+#define DEBUG 1
+
 #ifdef DEBUG
 static char *be_state_name[] = {
        [BEST_CLOSED]       = "closed",
@@ -900,7 +902,7 @@ static int network_close(struct net_device *dev)
 {
        struct netfront_info *np = netdev_priv(dev);
        np->user_state = UST_CLOSED;
-       netif_stop_queue(np->netdev);
+       netif_stop_queue(dev);
        return 0;
 }
 
@@ -1164,8 +1166,6 @@ static void netfront_closing(struct xenbus_device *dev)
 
        DPRINTK("netfront_closing: %s removed\n", dev->nodename);
 
-       close_netdev(info);
-
        xenbus_switch_state(dev, NULL, XenbusStateClosed);
 }
 
index 79636ac20aa5e2a2c4520883bd317810e8410a84..7ea044f4bccf44ba9adf86e3e5978349c063fc20 100644 (file)
@@ -3,12 +3,6 @@
 dir=$(dirname "$0")
 . "$dir/block-common.sh"
 
-case "$command" in
-    online | offline)
-        exit 0
-        ;;
-esac
-
 expand_dev() {
   local dev
   case $1 in
index 2e4683111177bb76ac6f44d7780ecf5dd860887a..6c44f87c4569f80f04998797af1e882167e83848 100644 (file)
@@ -21,9 +21,7 @@ dir=$(dirname "$0")
 
 findCommand "$@"
 
-if [ "$command" != "online" ]  &&
-   [ "$command" != "offline" ] &&
-   [ "$command" != "add" ]     &&
+if [ "$command" != "add" ] &&
    [ "$command" != "remove" ]
 then
   log err "Invalid command: $command"
index c58adb595d5174ef9bcc7740d7f32dc8fec7cad9..75c6f257aa640a6ae6b39ebbf759690143364912 100755 (executable)
@@ -11,7 +11,7 @@ dir=$(dirname "$0")
 . "$dir/block-common.sh"
 
 case "$command" in
-  bind)
+  add)
     for dev in /dev/nd*; do
       if nbd-client $2:$3 $dev; then
         write_dev $dev
@@ -20,7 +20,7 @@ case "$command" in
     done
     exit 1
     ;;
-  unbind)
+  remove)
     nbd-client -d $2
     exit 0
     ;;
index 142a403c0f97e60a621d80cd1a02bd070b90b786..8c5cb17b7970e767ae77613033237f48e214fef2 100644 (file)
@@ -11,7 +11,7 @@ dir=$(dirname "$0")
 . "$dir/block-common.sh"
 
 case "$command" in
-  bind)
+  add)
     for dev in /dev/nbd*; do
       if nbd-client $2 $3 $dev; then
         write_dev $dev
@@ -20,7 +20,7 @@ case "$command" in
     done
     exit 1
     ;;
-  unbind)
+  remove)
     nbd-client -d $2
     exit 0
     ;;